//
//  STDCreditManager.h
//  FrontierApp
//
//  Created by curer on 11/13/15.
//  Copyright © 2015 lion. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
#import "STDAppModel.h"
#import "STDTaskModel.h"

typedef void(^STDCreditManagerCallback)(id object, NSError *error);

extern NSString *kSTDCreditManagerNotificationLoginIn;
extern NSString *kSTDCreditManagerErrorDomain;

@interface STDCreditManager : NSObject

+ (instancetype)sharedInstance;

+ (void)setToken:(NSString *)token;
+ (NSString *)token;

- (void)fetchTasks:(STDCreditManagerCallback)callback;

- (void)createTask:(STDTaskModel *)model callback:(STDCreditManagerCallback)callback;
- (void)cancelTask:(STDTaskModel *)model callback:(STDCreditManagerCallback)callback;
- (void)accomplishtTask:(STDTaskModel *)model callback:(STDCreditManagerCallback)callback;

@end
